<?php include(APPPATH.'views/header.php'); ?>
<script language="javascript" type="text/javascript" src="/js/My97DatePicker/WdatePicker.js"></script>
<div class="pay_block">
    <div class="pay_block_left">
        <h2>个人中心</h2>
        <div class="left_menu">
            <div class="please">欢迎来到个人中心：</div>
            <ul>
            <?php include('left.php');?>
            </ul>
            <div class="customer_service">
                <p style="padding:55px 10px 10px 20px;"> 在线时间：<br/> 每天10:00-18:00</p>
                <p style="padding:15px 15px 10px 48px;"> <a target="_blank" href="http://wpa.qq.com/msgrd?v=3&uin=871705602&site=qq&menu=yes">点击这里<br/>给我发消息</a> </p>
                <!--QQ在线，以上，请把871705602测试账号改成客服中心的正确号码-->
                <p style="padding:25px 0px 10px 10px;">平台充值问题专区：</p>
                <p style="padding:5px 15px 10px 50px;"><a href="#">点击进入</a></p>
            </div>
            <!--客服结束-->
        </div>
        <div class="left_bottom_bg"></div>
    </div>
    <div class="pay_block_right">
        <div class="title1">
            <h2 class="bank_7">充值记录</h2>
        </div>
        <form action="/user/center/payLog" method="post">
        <div class="pay_record_search">
            <a href="/user/center/payLog?start_time=<?=(date('Y-m-d H:i:s', time()-(7*86400)));?>&end_time=<?=(date('Y-m-d H:i:s'));?>">
                <input type="button" value="最近七天" class="button8"/>
            </a>
            <a href="/user/center/payLog?start_time=<?=(date('Y-m').'-01 00:00:00');?>&end_time=<?=(date('Y-m-d H:i:s'));?>">
                <input type="button" value="本月" class="button8"/>
            </a>
            <a href="/user/center/payLog?start_time=<?=(date('Y-').(date('m') - 1).'-01 00:00:00');?>&end_time=<?=(date('Y').'-'.(date('m') - 1).'-'.date('t', strtotime(date('Y').'-'.(date('m') - 1).'-01')).' 23:59:59');?>">
                <input type="button" value="上月" class="button8"/>
            </a>
            <span style="margin:0 5px 0 20px;">起止日期：从</span>

                <input type="text" style="width:90px" name="start_time" onclick="WdatePicker({startDate:'%y-%M-01 00:00:00',dateFmt:'yyyy-MM-dd',alwaysUseStartDate:true})"
                       value="<?=(date('Y-m-d', time()-(7*86400)));?>"/>
                <span style="margin:0 5px;">至</span>
                <input type="text" style="width:90px" name="end_time" onclick="WdatePicker({startDate:'%y-%M-01 00:00:00',dateFmt:'yyyy-MM-dd',alwaysUseStartDate:true})"
                       value="<?=date('Y-m-d')?>"/>
                <input type="submit" value="查询" class="button7"/>
        </div>
        </form>
        <!--充值记录查询条件结束-->
        <div class="pay_record_list">
            <table width="100%" border="0" cellspacing="0" cellpadding="0" class="bs_list">
                <tr>
                    <th>时间</th>
                    <th>游戏</th>
                    <th>金额（元）</th>
                    <th>订单号</th>
                    <th>状态</th>
                </tr>
                <?php if ( empty ($data) ) {?>
                    <tr><td colspan="5">您还没有订单</td></tr>
                <?php } else {?>
                    <?php foreach ($data as $v) {?>
                    <tr>
                        <td><?=$v['create_time']?></td>
                        <td>围棋</td>
                        <td><?=$v['price']?></td>
                        <td><?=$v['order_sn']?></td>
                        <td><?php
                                $s = '';
                            switch ($v['order_flag']) {
                                case '0': $s = '初始';break;
                                case '1': $s = '成功';break;
                                case '2': $s = '失败';break;
                                default: $s = '初始';
                            }
                                echo $s;
                            ?></td>
                    </tr>
                    <?php }?>
                <?php }?>
            </table>
        </div>
        <!--翻页开始-->

        <div class="page">
        <?=$page_html;?>
        </div>

        <!--
        <div class="page">
            <span class="disabled"> 上一页</span>
            <span class="current">1</span>
            <a href="#">2</a>
            <a href="#">3</a>
            <a href="#">4</a>
            <a href="#">5</a>
            <a href="#">6</a>
            <a href="#">7</a>...
            <a href="#">199</a>
            <a href="#">200</a>
            <a href="#">下一页</a>
        </div>
        -->
        <!--翻页结束-->
    </div>
    <!--主体部分结束-->
<?php include(APPPATH.'views/footer.php');?>